package vsvm.gui.forms;

import java.awt.BorderLayout;

import javax.swing.JScrollPane;
import javax.swing.JTextArea;

import vsvm.gui.Environment;
import vsvm.gui.VSVMInternalFrame;

public class OutputFrame extends VSVMInternalFrame {
	private JTextArea txt;
	private JScrollPane sp;
	
	public OutputFrame(String title) {
		super(title);
		setLayout(new BorderLayout());
		txt = new JTextArea();
		txt.setEditable(false);
		sp = new JScrollPane(txt);
		this.add(sp, BorderLayout.CENTER);		
	}
	
	public void log(String s) {
		txt.append(s + Environment.newline);
		txt.setCaretPosition(txt.getText().length());
		
	}

}
